<%--

 Lets you view the WebQuilt Proxy bug reports.
 
 This software is distributed under the Berkeley Software License.
   See "http://guir.cs.berkeley.edu/projects/COPYRIGHT.txt" for details

 author: Jeffrey Heer 2/01 - jheer@hkn.eecs.berkeley.edu

--%>
<%@ page import="java.io.*"                                                      %>
<%@ page import="java.util.Date"                                                 %>
<%@ page import="edu.berkeley.guir.webquilt.*"                                   %>
<HTML>
    <HEAD>
    <TITLE>WebQuilt Bug Report Submit</TITLE>
    </HEAD>

    <BODY BGCOLOR="#FFFFFF">
    <H1>WebQuilt Bug Report - Session <%= session.getId() %></H1>
    <BR>

<%
    if ( request.getParameter("descrip") == null ) {
	String strUrl     = request.getParameter("url");
	%> <%@ include file='bugrep_form.html' %> <%
    } else {
	String strDescrip = request.getParameter("descrip");
	String strUrl     = request.getParameter("url");
	String strId      = session.getId();
	String strSender  = request.getParameter("sender");

	FileWriter fwtr = new FileWriter("BUGREP_webquilt.txt", true);
	fwtr.write("---------------------------------------\n");
	fwtr.write("%%\n");
	fwtr.write("Time: " + new Date().toString() + "\n");
	fwtr.write("URL:  " + strUrl + "\n");
	fwtr.write("ID:   " + strId + "\n");
	fwtr.write("Bug Description --\n");
	fwtr.write(strDescrip);
	fwtr.write("\n\nSubmitted by: " + strSender + "\n\n\n");
	fwtr.close();
 
	%> <%@ include file='bugrep_received.html' %> <%
    }
%>

    </BODY>
</HTML>
